home *** CD-ROM | disk | FTP | other *** search
/ Enter 2010 January / ENTER_2010_01.iso / Programy / Gry / Base_Invaders_ / BaseInvadersSetup1.3.exe / {app} / Scripts / Startup.lua < prev    next >
Encoding:
Text File  |  2007-01-25  |  2.2 KB  |  84 lines

  1. -- These are new default script functions that are used in different parts of the scripts:
  2.  
  3. dofile( "Scripts/IntroImagePopup.lua" )
  4. dofile( "Scripts/LargeTextPopup.lua" )
  5. dofile( "Scripts/ToolTips.lua" )
  6. dofile( "Scripts/LevelConfig.lua" )        --added by STEFAN for campaign implementation
  7. dofile( "Scripts/SpawnSystem.lua" )
  8. dofile( "Scripts/CinemaSystem.lua" )    -- In-game cinematics / bars
  9. dofile( "Scripts/Intro.lua" )
  10.  
  11. G.SunMoveRate( 0 )
  12. G.SetTimeOfDay( 0 )
  13.     
  14. -- This creates a new basic camera, and destroys any other camera
  15. function CreateBasicCamera()
  16.  
  17.     local cam = G.GetCogName( "Camera" )
  18.     if( cam ~= nil and cam.IsValid() ) then
  19.         cam.Destroy()
  20.     end
  21.     G.File( "Data/BasicCamera.xml" );
  22. end
  23.  
  24. CreateBasicCamera();
  25.  
  26. -- Play Menu Music:
  27. if( MainMenu == nil or not MainMenu.IsValid() ) then
  28.     G.File( "MenuData/MainMenuCog.xml" );
  29. end
  30.  
  31. MainMenu.CloseWindow( "ControlsWindow" );
  32. MainMenu.CloseWindow( "OptionsWindow" );
  33. MainMenu.CloseWindow( "CreditsWindow" );
  34. MainMenu.CloseWindow( "BonusWindow" );
  35. MainMenu.CloseWindow( "InvaderViewerWindow" );
  36. MainMenu.CloseWindow( "InGameWindow" );
  37. MainMenu.CloseWindow( "LevelChoiceWindow" );
  38. MainMenu.CloseWindow( "GameOverWindow" );
  39. MainMenu.CloseWindow( "InGameExitWindow" );                
  40. MainMenu.CloseWindow( "StartWindow" ); -- OpenWindow( "StartWindow", false );
  41.  
  42. if( Traitor == nil or not Traitor.IsValid() ) then
  43.     G.File( "MenuData/TraitorCog.xml" );
  44. end
  45.  
  46. DeactivateTraitor()
  47. Traitor.CloseWindow( "Special" );
  48.  
  49. function EnableDoodads()
  50.     if(  false ) then -- G.KeyTriggered( "C" ) ) then -- 
  51.         G.EnableTrap( "rock" )
  52.         G.EnableTrap( "bush" )
  53.         G.EnableTrap( "tree" )
  54.         G.EnableTrap( "mushroom" )
  55.         G.EnableTrap( "bus" )
  56.         G.EnableTrap( "vase" )
  57.         G.EnableTrap( "church" )
  58.         G.EnableTrap( "pit" )
  59.         G.EnableTrap( "bomb" )
  60.     end
  61. end
  62.  
  63. GMain["EnableDoodads"] = EnableDoodads;
  64.  
  65.  
  66. function ScreenCapFunc()    
  67.     if( G.KeyTriggered( "SysReq" ) ) then
  68.         G.ScreenCap()
  69.     end
  70. end
  71. GMain["ScreenCapFunc"] = ScreenCapFunc;
  72.  
  73. function MonoChrome()
  74.     G.DoPostPass( "MonoChrome",  1, 1, 0 );
  75. end
  76.  
  77. function Glare()
  78.     G.DoPostPass( "DownSample",  1, 1, 2 );
  79.     G.DoPostPass( "Threshold",  2, 2, 3 );
  80.     G.BlurBuffer( 3 , 5 );
  81.     G.DoPostPass( "FinalGlare" , 1, 3, 0 );
  82. end
  83.  
  84. PlayIntro()